/*
 Navicat Premium Data Transfer

 Source Server         : 本地mysql
 Source Server Type    : MySQL
 Source Server Version : 50724
 Source Host           : 127.0.0.1:3306
 Source Schema         : anti_fake_sys

 Target Server Type    : MySQL
 Target Server Version : 50724
 File Encoding         : 65001

 Date: 19/03/2019 19:45:32
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for anti_fake_code
-- ----------------------------
DROP TABLE IF EXISTS `anti_fake_code`;
CREATE TABLE `anti_fake_code`  (
  `id` int(13) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `name` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL COMMENT '防伪码名称',
  `code` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL COMMENT '防伪码',
  `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  `first_search_time` datetime(0) NULL DEFAULT NULL COMMENT '第一次查询时间',
  `search_num` int(8) NULL DEFAULT NULL COMMENT '查询次数',
  `validate_time` datetime(0) NULL DEFAULT NULL COMMENT '防伪码生效日期',
  `status` int(4) NULL DEFAULT NULL COMMENT '状态（0:不显示，1：正常）',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 101 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci COMMENT = '防伪码';

-- ----------------------------
-- Records of anti_fake_code
-- ----------------------------
BEGIN;
INSERT INTO `anti_fake_code` VALUES (1, 'test', '39444722505049685', '2019-03-02 14:24:06', '2019-03-06 01:55:32', 0, '2019-03-03 01:04:59', 1), (2, 'test', '07350562836434745', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (3, 'test', '37822745995512290', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (4, 'test', '59799531486869395', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (5, 'test', '69081577901406824', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (6, 'test', '71013428427442468', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (7, 'test', '04809194635758661', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (8, 'test', '69976619972800305', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (9, 'test', '42175932402392886', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (10, 'test', '64728062605412120', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (11, 'test', '63686379364265055', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (12, 'test', '63205886255995427', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (13, 'test', '69350898661277204', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (14, 'test', '14046860677288588', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (15, 'test', '43198177106506033', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (16, 'test', '54792635206800044', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (17, 'test', '66035473758655129', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (18, 'test', '61723506161582718', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (19, 'test', '21069818143201148', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (20, 'test', '59957299817776826', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (21, 'test', '87011235296661354', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (22, 'test', '15488598370113310', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (23, 'test', '50377054748828378', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (24, 'test', '78294628623079495', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (25, 'test', '91078822325311564', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (26, 'test', '83752304133814177', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (27, 'test', '70575353978631212', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (28, 'test', '97887086908425105', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (29, 'test', '23389063969134430', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (30, 'test', '29845964115320569', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (31, 'test', '50112149683635436', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (32, 'test', '74285842326157634', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (33, 'test', '55609327277001189', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (34, 'test', '73971727065846412', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (35, 'test', '31087383178901048', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (36, 'test', '69534095058644328', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (37, 'test', '77918431453402693', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (38, 'test', '99282338821332668', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (39, 'test', '01160321548390384', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (40, 'test', '91953059499083060', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (41, 'test', '23528666977400886', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (42, 'test', '28835359991725884', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (43, 'test', '33910392145705581', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (44, 'test', '87305582987372032', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (45, 'test', '70005428882046968', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (46, 'test', '65065763171872718', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (47, 'test', '55325250666572818', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (48, 'test', '17860582945478803', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (49, 'test', '30913074787188512', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (50, 'test', '83300068315237080', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (51, 'test', '58726606549645344', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (52, 'test', '19719378994096654', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (53, 'test', '84048043273707947', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (54, 'test', '65934842168105804', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (55, 'test', '27770299288599533', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (56, 'test', '01380927557377634', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (57, 'test', '29133724304310963', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (58, 'test', '55170564587887473', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (59, 'test', '81429396575813625', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (60, 'test', '63653208575300801', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (61, 'test', '28364713005527231', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (62, 'test', '80587374869791107', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (63, 'test', '01537582725953026', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (64, 'test', '31341212096851906', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (65, 'test', '39737593979459166', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (66, 'test', '74237760040335775', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (67, 'test', '58992952779590944', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (68, 'test', '68637270489103346', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (69, 'test', '99990151629548558', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (70, 'test', '91260325440418420', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (71, 'test', '87415264727692148', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (72, 'test', '52068211721347578', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (73, 'test', '40658558686929763', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (74, 'test', '21294544020910683', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (75, 'test', '39140756091809036', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (76, 'test', '11119911233672889', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (77, 'test', '85758497676259153', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (78, 'test', '76299986968083641', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (79, 'test', '92148834009354536', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (80, 'test', '22771606124310867', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (81, 'test', '91667988265112387', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (82, 'test', '85605632436045391', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (83, 'test', '23677059543084235', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (84, 'test', '71499827872898966', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (85, 'test', '47937562528551831', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (86, 'test', '89281245531579164', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (87, 'test', '01126119819396599', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (88, 'test', '94287738852707480', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (89, 'test', '70424474388268924', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (90, 'test', '36985339118368892', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (91, 'test', '19313010148611658', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (92, 'test', '05280776627862319', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (93, 'test', '89143230639838432', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (94, 'test', '63190859619508442', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (95, 'test', '50672958318722844', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (96, 'test', '83654106763796678', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (97, 'test', '65467531576828380', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (98, 'test', '43061390628904756', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (99, 'test', '35142429590197295', '2019-03-02 14:24:06', NULL, 0, NULL, 0), (100, 'test', '20669800842738701', '2019-03-02 14:24:06', NULL, 0, NULL, 0);
COMMIT;

-- ----------------------------
-- Table structure for t_sys_log
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_log`;
CREATE TABLE `t_sys_log`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `username` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名',
  `operation` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户操作',
  `method` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '请求方法',
  `params` varchar(5000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '请求参数',
  `time` bigint(20) NOT NULL COMMENT '执行时长(毫秒)',
  `ip` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'IP地址',
  `create_date` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统日志';

-- ----------------------------
-- Table structure for t_sys_menu
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_menu`;
CREATE TABLE `t_sys_menu`  (
  `menu_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `parent_id` bigint(20) NULL DEFAULT NULL COMMENT '父菜单ID，一级菜单为0',
  `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单名称',
  `url` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单URL',
  `perms` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '授权(多个用逗号分隔，如：user:list,user:create)',
  `type` int(11) NULL DEFAULT NULL COMMENT '类型   0：目录   1：菜单   2：按钮',
  `icon` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单图标',
  `order_num` int(11) NULL DEFAULT NULL COMMENT '排序',
  `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  `status` int(10) NULL DEFAULT NULL COMMENT '菜单状态 :  1:启用   0:不启用',
  PRIMARY KEY (`menu_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 142 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '菜单管理';

-- ----------------------------
-- Records of t_sys_menu
-- ----------------------------
BEGIN;
INSERT INTO `t_sys_menu` VALUES (1, 0, '系统管理', '', '', 0, '&#xe634;', 99, '2018-07-04 15:14:45', 1), (2, 1, '用户管理', '/html/sys/user/userList.html', 'search,save,updateStatus,sync', 1, '&#xe634;', 1, '2018-07-04 15:14:51', 1), (3, 1, '角色管理', '/html/sys/role/list.html', 'search,save,updateStatus,delete', 1, '&#xe634;', 2, '2018-07-04 15:14:55', 1), (4, 1, '菜单管理', '/html/sys/menu/list.html', 'search,save,updateStatus,delete', 1, '&#xe634;', 3, '2018-07-04 15:14:55', 1), (123, 2, '查找', NULL, 'sys:user:search', 2, NULL, 0, '2019-03-02 12:55:43', 1), (124, 2, '新增与修改', NULL, 'sys:user:save', 2, NULL, 0, '2019-03-02 12:55:43', 1), (125, 2, '审核', NULL, 'sys:user:updateStatus', 2, NULL, 0, '2019-03-02 12:55:43', 1), (126, 2, '同步', NULL, 'sys:user:sync', 2, NULL, 0, '2019-03-02 12:55:43', 1), (127, 3, '查找', NULL, 'sys:role:search', 2, NULL, 0, '2019-03-02 12:56:36', 1), (128, 3, '新增与修改', NULL, 'sys:role:save', 2, NULL, 0, '2019-03-02 12:56:36', 1), (129, 3, '审核', NULL, 'sys:role:updateStatus', 2, NULL, 0, '2019-03-02 12:56:36', 1), (130, 3, '删除', NULL, 'sys:role:delete', 2, NULL, 0, '2019-03-02 12:56:36', 1), (131, 4, '查找', NULL, 'sys:menu:search', 2, NULL, 0, '2019-03-02 12:56:41', 1), (132, 4, '新增与修改', NULL, 'sys:menu:save', 2, NULL, 0, '2019-03-02 12:56:41', 1), (133, 4, '审核', NULL, 'sys:menu:updateStatus', 2, NULL, 0, '2019-03-02 12:56:41', 1), (134, 4, '删除', NULL, 'sys:menu:delete', 2, NULL, 0, '2019-03-02 12:56:41', 1), (135, 0, '防伪码管理', '', '', 0, '&#xe634;', 0, '2019-03-02 13:30:19', 1), (136, 135, '防伪码管理', '/html/antiFakeSys/antiFakeCode/list.html', 'search,save,updateStatus,delete,export', 1, '&#xe634;', 0, '2019-03-02 13:32:26', 1), (137, 136, '查找', NULL, 'antiFakeSys:antiFakeCode:search', 2, NULL, 0, '2019-03-02 13:32:26', 1), (138, 136, '新增与修改', NULL, 'antiFakeSys:antiFakeCode:save', 2, NULL, 0, '2019-03-02 13:32:26', 1), (139, 136, '审核', NULL, 'antiFakeSys:antiFakeCode:updateStatus', 2, NULL, 0, '2019-03-02 13:32:26', 1), (140, 136, '删除', NULL, 'antiFakeSys:antiFakeCode:delete', 2, NULL, 0, '2019-03-02 13:32:26', 1), (141, 136, '导出', NULL, 'antiFakeSys:antiFakeCode:export', 2, NULL, 0, '2019-03-02 13:32:26', 1);
COMMIT;

-- ----------------------------
-- Table structure for t_sys_role
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_role`;
CREATE TABLE `t_sys_role`  (
  `role_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `role_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色名称',
  `remark` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`role_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色';

-- ----------------------------
-- Records of t_sys_role
-- ----------------------------
BEGIN;
INSERT INTO `t_sys_role` VALUES (1, 'admin', '管理员', '2018-07-02 08:40:53');
COMMIT;

-- ----------------------------
-- Table structure for t_sys_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_role_menu`;
CREATE TABLE `t_sys_role_menu`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `role_id` bigint(20) NULL DEFAULT NULL COMMENT '角色ID',
  `menu_id` bigint(20) NULL DEFAULT NULL COMMENT '菜单ID',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色与菜单对应关系';

-- ----------------------------
-- Table structure for t_sys_user
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_user`;
CREATE TABLE `t_sys_user`  (
  `user_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `username` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户名',
  `password` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '密码',
  `salt` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '盐',
  `email` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮箱',
  `mobile` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '手机号',
  `status` int(10) NULL DEFAULT NULL COMMENT '状态  0：禁用   1：正常',
  `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`user_id`) USING BTREE,
  UNIQUE INDEX `username`(`username`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统用户';

-- ----------------------------
-- Records of t_sys_user
-- ----------------------------
BEGIN;
INSERT INTO `t_sys_user` VALUES (1, 'admin', 'a81336252d632bd6d5a319f9f5e936fde960f342d5de3b40714f97044871c0a8', 'YzcmCZNvbXocrsz9dm8e', 'root@qq.com', '13612345678', 1, '2016-11-11 11:11:11');
COMMIT;

-- ----------------------------
-- Table structure for t_sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_user_role`;
CREATE TABLE `t_sys_user_role`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) NULL DEFAULT NULL COMMENT '用户ID',
  `role_id` bigint(20) NULL DEFAULT NULL COMMENT '角色ID',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 70 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户与角色对应关系';

-- ----------------------------
-- Records of t_sys_user_role
-- ----------------------------
BEGIN;
INSERT INTO `t_sys_user_role` VALUES (1, 1, 1), (12, 2, 2), (15, 4, 2), (16, 4, 3), (43, 3, 5), (56, 6, 5), (61, 5, 1), (62, 5, 2), (63, 5, 3), (64, 5, 4), (65, 7, 6), (67, 8, 5), (69, 9, 1);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;